package com.yy.music.view.utils;

import com.yy.music.model.user.User;

public class UserManager {
    private static UserManager sUserManager;
    private User mUser;

    public static UserManager getInstance() {
        return UserManagerHolder.INSTANCE;
    }

    private static class UserManagerHolder {
        private static UserManager INSTANCE = new UserManager();
    }

    public void saveUser(User user) {
        mUser = user;
        saveLocal(user);
    }

    private void saveLocal(User user) {

    }

    public User getUser() {
        return mUser;
    }

    private User getLocal() {
        return null;
    }

    public boolean hasLogin() {
        return getUser() != null;
    }

    public void removeUser(User user) {
        mUser = null;
        removeLocal();
    }

    private void removeLocal() {

    }
}
